package com.ylink.epcc.epccdemocustomization.controller;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ylink.epcc.common.web.EpccController;
import com.ylink.epcc.epccdemocustomization.handler.EpccDemoCustomizationIHandler;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestController
public class EpccDemoCustomizationController extends EpccController {

	private EpccDemoCustomizationIHandler epcc209Handler;

	@Override
	protected void initHandler() {
		epcc209Handler = initHandler(EpccDemoCustomizationIHandler.class, "epcc209Handler");
	}

	@RequestMapping(value = "/handle")
	public String handle(@RequestBody String msg) {
//		log.info("/epcc209/handle: [{}]", msg);
		String str = epcc209Handler.handle(msg);
//		log.info("Epcc209:[{}]", str);
		return str;
	}

}
